import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;

public class Lesson12 {

    /**
     *  使用BiConsumer处理两个阶段的结果
     *
     * */
    public static void main(String[] args) {
        String message = "Message";
        CompletableFuture completableFuture = CompletableFuture
                .completedFuture(message)
                .thenApply(String::toUpperCase)
                .thenAcceptBoth(CompletableFuture.completedFuture(message).thenApply(String::toLowerCase), (s1, s2) -> System.out.println(s1));

    }
}
